#include <stdio.h>

enum weekday
{
    Mon = 1,
    Tue,
    Wed,
    Thu,
    Fri,
    Sat,
    Sun
};
char *name[8] = {"error", "Mon", "Tue", "Wed",
                 "Thu", "Fri", "Sat", "Sun"
                };
int main()
{
    enum weekday d;
    printf("Input today's numeral(1-7):");
    scanf("%d", &d);
    if (d > 0 && d < 7)
        d++; /* 今天是星期一到星期六的时候 */
    else if (d == 7)
        d = 1; /* 今天是星期日 */
    else
        d = 0;
    if (d)
        printf("Tomorrow is %s.\n", name[d]);
    else
        printf("%s\n", name[d]);
}

